<div class="dux-tools">
  <div class="bread-head">后台菜单管理 <span class="small">管理后台菜单</span> </div>
  <br>
  <div class="tools-function clearfix">
    <div class="float-left"> <a class="button button-small bg-main icon-list" href="__URL__"> 菜单列表</a> </div>
    <?php if(model('user_group')->model_power('category','add')){ ?>
    <div class="button-group float-right"> <a class="button button-small bg-dot icon-plus dropdown-toggle"> 添加 <span class="downward"></span></a>
      <ul class="drop-menu pull-right">
        <li><a href="__APP__/adminmenu/add">添加后台菜单</a></li>
      </ul>
    </div>
    <?php } ?>
  </div>
</div>
<div class="admin-main">
  <form action="__URL__/{$action}_save/time-<?php echo time(); ?>-ajax-true" method="post" id="form" class="form-x dux-form form-auto">
    <div class="panel dux-box  active">
    <div class="panel-head"> <strong>{$action_name}菜单</strong> </div>
    <div class="panel-body">
      <div class="form-group">
        <div class="label">
          <label>上级菜单</label>
        </div>
        <div class="field">
           <select name="pid" id="pid" class="input">
          <option value="0">=====顶级栏目=====</option>
          <!--foreach:{$category_list $vo}-->
          <option <!--if:{$vo['id']==$info['pid']}-->selected="selected"<!--{/if}--> value="{$vo.id}">{$vo.cname}</option>
          <!--{/foreach}-->
      </select>
          <div class="input-note">菜单上级栏目</div>
        </div>
      </div>
        <div class="form-group">
          <div class="label">
            <label>菜单名称</label>
          </div>
          <div class="field">
            <input name="name" type="text" size="60" class="input" id="name" value="{$info.name}" reg="\S" msg="菜单名称不能为空" />
            <div class="input-note"></div>
          </div>
        </div>
        <div class="form-group">
          <div class="label">
            <label>模块名</label>
          </div>
          <div class="field">
            <input name="module" type="text" size="60" class="input" id="module" value="{$info.module}" reg="\S" msg="模块名称不能为空" />
            <div class="input-note"></div>
          </div>
        </div>
        <div class="form-group">
          <div class="label">
            <label>菜单图标样式</label>
          </div>
          <div class="field">
            <input name="icon" type="text" size="60" class="input" id="icon" value="{$info.icon}" reg="\S" msg="菜单图标样式不能为空" />
            <div class="input-note"></div>
          </div>
        </div>
        <div class="form-group">
          <div class="label">
            <label for="sitename">菜单显示</label>
          </div>
          <?php if(!isset($info['status'])){ $info['status']=1; } ?>
          <div class="field">
            <div class="button-group button-group-small radio">
            <?php if($info['status']){ ?>
              <label class="button active">
                <input name="status" value="1"   checked="checked" type="radio">
                <span class="icon icon-check"></span> 显示</label>
              <label class="button">
                <input name="status" value="0" type="radio">
                <span class="icon icon-times"></span> 隐藏</label>
            <?php }else{?>
              <label class="button">
                <input name="status" value="1" type="radio">
                <span class="icon icon-check"></span> 显示</label>
              <label class="button active">
                <input name="status" value="0" checked="checked" type="radio">
                <span class="icon icon-times"></span> 隐藏</label>
            <?php }?>    
            </div>
            <div class="input-note"></div>
          </div>
        </div>
      </div>
    </div>
   <?php if(model('user_group')->model_power('fragment','add')||model('user_group')->model_power('fragment','edit')){ ?>
    <!--普通提交-->
    <div class="panel-foot">
      <div class="form-button">
        <div id="tips"></div>
       <input name="id" type="hidden" value="{$info.id}" />
        <input name="file_id" id="file_id" type="hidden" value="{$file_id}" />
        <button type="submit" class="button bg-main">保存</button>
      </div>
    </div>
    <?php } ?>
  </form>
</div>
</div>
<script type="text/javascript">
//提交表单
savelistform({addurl:"__URL__/add",listurl:"__URL__"});
</script>